package com.hoshiicloud.commissioncalculation.feign;

import com.hoshiicloud.commissioncalculation.feign.hystrix.HystrixOrderFeignFallback;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.saleorder.entity.OrderInfo;
import com.hoshiicloud.saleorder.entity.OrderMain;
import com.hoshiicloud.saleorder.param.OrderInfoQueryParam;
import com.hoshiicloud.saleorder.param.OrderMainQueryParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author ygd
 * @version 1.0
 * @title: OrderFeignService
 * @description: 订单微服务FeignClient
 * @date 2019/6/10
 */
@FeignClient(name = "hoshiicloud-sale-order", fallbackFactory = HystrixOrderFeignFallback.class)
public interface OrderFeignService {


    /**
     * 根据条件查询主订单
     *
     * @param param
     * @return
     */
    @RequestMapping(value = "/saleorder/order-main/list", method = RequestMethod.POST)
    Response<List<OrderMain>> queryOrderMainList(@RequestBody OrderMainQueryParam param);

    /**
     * 根据条件查询子订单
     *
     * @param param
     * @return
     */
    @RequestMapping(value = "/saleorder/order-info/list", method = RequestMethod.POST)
    Response<List<OrderInfo>> queryOrderInfoList(@RequestBody OrderInfoQueryParam param);

}
